Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command add start cluster #3458

Conversation

helen-frank
Copy link

Feature

Adds the command start cluster to command, which is used to start the cluster again.

User story

I am using kind to create multiple clusters on my mobile devices for development. When my mobile devices reboot, I have to manually start each container.
I wrote some docker related scripts to avoid having to start each container manually.
Now I'm thinking that I can use kind to start the clusters I want individually, instead of using docker to write a regular match to the cluster name to start the container for the corresponding cluster.

Usage example

# kind start cluster -n k1
Start cluster "k1" ...
Started nodes: ["k1-worker2" "k1-control-plane" "k1-worker"]

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Dec 20, 2023
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: helen-frank
Once this PR has been reviewed and has the lgtm label, please assign aojea for approval. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added area/provider/docker Issues or PRs related to docker area/provider/podman Issues or PRs related to podman size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Dec 20, 2023
@helen-frank helen-frank force-pushed the feature/add_start_cluster branch 2 times, most recently from c049975 to 9ae756a Compare December 20, 2023 09:12
Copy link
Member

@neolit123 neolit123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hi, new features should ideally be discussed in an issue first before a PR is sent.

with respect to "starting a cluster" it would also apply to cluster creation where it's automatic. if that's true would it make sense to also have a flag for "kind create cluster", that does not start the containers, letting the user to do it async?

@stmcginnis
Copy link
Contributor

I believe there are still some issues with restarting clusters (#1689, #2383, #2824, #2917, #3244). We would need to make sure those are addressed before adding an official command to support that operation, otherwise there will be an expectation that restarting is a supported functionality that will work.

It really is best to just delete and recreate your cluster, since kind clusters are meant to be disposable.

@helen-frank
Copy link
Author

hi, new features should ideally be discussed in an issue first before a PR is sent.

with respect to "starting a cluster" it would also apply to cluster creation where it's automatic. if that's true would it make sense to also have a flag for "kind create cluster", that does not start the containers, letting the user to do it async?

ok, I'll take care of it from now on

I agree with you about adding a flag to 'kind create cluster'.

@helen-frank
Copy link
Author

I believe there are still some issues with restarting clusters (#1689, #2383, #2824, #2917, #3244). We would need to make sure those are addressed before adding an official command to support that operation, otherwise there will be an expectation that restarting is a supported functionality that will work.

It really is best to just delete and recreate your cluster, since kind clusters are meant to be disposable.

Thank you for summarizing your questions

My idea is to provide a simple way to start the cluster first, similar to batch boot nodes, to reduce the difficulty of manual operation. For more network or physical machine related issues, I don't agree that they should be solved in start, start should solve the problem of quickly starting the cluster nodes.

Regarding your point about clusters being disposable, I've probably seen that it's more common to reuse clusters except when running bulk tests. This is because you're deploying applications in the cluster to provide services for development, and you don't want to redeploy them.

@helen-frank
Copy link
Author

/retest

@helen-frank helen-frank force-pushed the feature/add_start_cluster branch 9 times, most recently from 6a88ff2 to 86dbbf0 Compare December 22, 2023 07:46
Signed-off-by: helen <haitao.zhang@daocloud.io>
@k8s-ci-robot
Copy link
Contributor

@helen-frank: The following tests failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
pull-kind-e2e-kubernetes-1-25 7c9aeac link true /test pull-kind-e2e-kubernetes-1-25
pull-kind-e2e-kubernetes-1-24 7c9aeac link true /test pull-kind-e2e-kubernetes-1-24

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@BenTheElder
Copy link
Member

Per our contributing guide (linked in CONTRIBUTING.md, the welcome message, our readme, and our docs site), features like this should be discussed in an issue first and the approach agreed upon.

You can workaround this for now with something like kind get nodes | xargs docker start if this implementation is sufficient for your useage.

As-is, support for restarts is limited to a single podman cluster or docker clusters, not guaranteed, and disposable usage is highly encouraged / optimized for.

@helen-frank
Copy link
Author

/close

@k8s-ci-robot
Copy link
Contributor

@helen-frank: Closed this PR.

In response to this:

/close

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/provider/docker Issues or PRs related to docker area/provider/podman Issues or PRs related to podman cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants